package com.lqs.dataservice.Controller;

import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import com.lqs.dataservice.entity.Helps;
import com.lqs.dataservice.Service.HelpsService;
import com.nip.db.mongodb.utils.tips.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

@Component
public class HelpsController implements GraphQLQueryResolver, GraphQLMutationResolver{
    @Autowired
    HelpsService helpsService;

    public List<Helps> findAllHelps() {
        return helpsService.findAllHelps();
    }

    public Helps findHelpsById(String id) {
        return helpsService.findHelpsById(id);
    }

    public Response saveHelps(Helps entity) {
        return helpsService.saveHelps(entity);
    }
    public Response deleteHelpsById(String id) {
        return helpsService.deleteHelpsById(id);
    }

}
